package vj.matrix;

public class MatrixUtils {
	
	public boolean find(int a[][], int k) {
		int r = 0, c = a[0].length - 1;
		while(r < a.length && c > 0) {
			if(a[r][c] == k)
				return true;
			else if(a[r][c] > k)
				c--;
			else
				r++;
		}
		return false;

	}

}
